/**
 * 
 */
package us.gaaoc.framework.dao;

import org.hibernate.Query;

import us.gaaoc.framework.model.Court;
import us.gaaoc.framework.model.LocalCaseCategory;
import us.gaaoc.framework.model.LocalCaseDivision;

/**
 * 
 * @author hea
 * May 18, 2007
 */
public class LocalCaseDivisionDAOHibernate extends GenericHibernateDAO<LocalCaseDivision, Integer, LocalCaseDivisionDAO>
implements  LocalCaseDivisionDAO{
	 

	public LocalCaseDivision findLocalCaseDivisionByCourtandCode(Court court, String code) {
		Query q = this.getSession().createQuery("from LocalCaseDivision c where c.court = ? and c.cmsCode = ? ");
		q.setEntity(0, court);
        q.setString(1, code);
        return (LocalCaseDivision)q.uniqueResult();
	}
}
